<div class="row">
    <ol class="breadcrumb">
        <li><a href="{{prefix}}index.html"><span class="iconfont icon-shouye mr-10"></span>当前位置:优农后台</a></li>
        <li class="active">增改运费模板</li>
    </ol>
</div><!--/.row-->

<form name="aEGoodsForm" form-validate>
    <div class="pl-20">
        <div class="clearfix h-30px mt-15 d-b">
            <div class="f-l w-100px ta-r fw-b">模板名称<i class="cor-red mr-5">*</i>：</div>
            <div class="f-l ml-10">
                <input type="text" class="pt-5 pb-5 pl-10 pr-10 w-500px" ng-model="getData.name" name="name" validate='{"required" : "请选择模版名称"}' required>
            </div>
        </div>

        <div class="clearfix h-30px mt-15 d-b">
            <div class="f-l w-100px ta-r fw-b">是否包邮<i class="cor-red mr-5">*</i>：</div>
            <div class="f-l ml-10">
                <label class="mr-20" ng-repeat="item in viewData.detailPostage">
                    <input type="radio" name="inclPostage" value={{item.inclPostage}}  ng-model="getData.inclPostage"  ng-checked="item.inclPostage === 'true'"><span class="ml-5">{{item.name}}</span>
                </label>
            </div>
        </div>

        <div class="clearfix h-30px mt-15 d-b">
            <div class="f-l w-100px ta-r fw-b">快递<i class="cor-red mr-5">*</i>：</div>
            <div class="f-l ml-10">
                <input class="select w-200px p-5" ng-model="getData.carryWay" name="carryWay" validate='{"required" : "请选择快递名称"}' required>
            </div>
        </div>

        <div ng-if="getData.inclPostage == 'false'">
            <div class="clearfix h-30px mt-15 d-b">
                <div class="f-l w-100px ta-r fw-b">计量方式<i class="cor-red mr-5">*</i>：</div>
                <div class="f-l ml-10">
                    <label class="mr-20" ng-repeat="item in viewData.detailPricing">
                        <input type="radio" name="pricing" ng-model="getData.valuationModel" value="{{item.id}}" ng-checked="item.id == 2" ng-change="pricingToggle(getData.valuationModel)"><span class="ml-5">{{item.name}}</span>
                    </label>
                </div>
            </div>

            <div class="clearfix h-30px mt-15 d-b" ng-show="getData.valuationModel == 1">
                <div class="f-l w-100px ta-r fw-b">默认运费<i class="cor-red mr-5">*</i>：</div>
                <div class="f-l ml-10">
                    <input class="select w-150px p-5 mr-5" ng-model="viewData.defaul.firstPiece" name="firstPieceA" validate='{"required" : "请输入默认件首件"}' ng-required="getData.valuationModel == 1">件内,
                    <input class="select w-150px p-5 mr-5" ng-model="viewData.defaul.firstAmount" name="firstAmountA" validate='{"required" : "请输入默认件首费用"}' ng-required="getData.valuationModel == 1">元,
                </div>
                <div class="f-l ml-10">
                    每增加<input class="select w-150px p-5 mr-5 ml-5" ng-model="viewData.defaul.secondPiece" name="secondPieceA" validate='{"required" : "请输入默认件续件"}' ng-required="getData.valuationModel == 1">件,
                    增加运费<input class="select w-150px p-5 mr-5 ml-5" ng-model="viewData.defaul.secondAmount" name="secondAmountA" validate='{"required" : "请输入默认件续件价格"}' ng-required="getData.valuationModel == 1">元
                </div>
            </div>
            <div class="clearfix h-30px mt-15 d-b" ng-show="getData.valuationModel == 2 || !getData.valuationModel">
                <div class="f-l w-100px ta-r fw-b">默认运费<i class="cor-red mr-5">*</i>：</div>
                <div class="f-l ml-10">
                    <input class="select w-150px p-5 mr-5" ng-model="viewData.defaul.firstWeight" name="firstWeightB" validate='{"required" : "请输入默认首重"}' ng-required="getData.valuationModel == 2 || !getData.valuationModel">千克,
                    <input class="select w-150px p-5 mr-5" ng-model="viewData.defaul.firstAmount" name="firstAmountB" validate='{"required" : "请输入默认续重"}' ng-required="getData.valuationModel == 2 || !getData.valuationModel">元,
                </div>
                <div class="f-l ml-10">
                    每增加<input class="select w-150px p-5 mr-5 ml-5" ng-model="viewData.defaul.secondWeight" name="secondWeightB" validate='{"required" : "请输入默认续重"}' ng-required="getData.valuationModel == 2 || !getData.valuationModel">千克,
                    增加运费<input class="select w-150px p-5 mr-5 ml-5" ng-model="viewData.defaul.secondAmount" name="secondAmountB" validate='{"required" : "请输入默认续重价格"}' ng-required="getData.valuationModel == 2 || !getData.valuationModel">元
                </div>
            </div>
            <div grid="gridOptions" class="mt-20"></div>
        </div>
    </div>

    <div class="mt-20 ta-c">
        <button class="btn br-5" form-submit="submit()">提交</button>
    </div>
</form>

<style>
    .area{
        position: relative;
    }
    .area .area-update{
        position: absolute;
        right:10px;
        top: 50%;
        margin-top: -10px;
    }
</style>
